package cn.zhaoyuening.schoolmates.web.general;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.zhaoyuening.schoolmates.dao.ArticleDao;
import cn.zhaoyuening.schoolmates.domain.Article;

@RestController
public class DemoRestController {
	@Autowired
	private ArticleDao articleDao;
	@RequestMapping("/demo")
	public String demo(){
		List<Article> list = articleDao.findAll();
		return list.get(0).getTitle();
	}
}
